
FIND_PATH(APR_INCLUDE_DIR apr.h
  PATHS
  $ENV{APR_DIR}
  NO_DEFAULT_PATH
  PATH_SUFFIXES include/apr1 include/apr-1 include/apr include
)

FIND_PATH(APR_INCLUDE_DIR apr.h
  PATHS
  ~/Library/Frameworks
  /Library/Frameworks
  /usr/local
  /usr
  /sw # Fink
  /opt/local # DarwinPorts
  /opt/csw # Blastwave
  /opt
  PATH_SUFFIXES include/apr1 include/apr-1 include/apr include
)

FIND_LIBRARY(APR_LIBRARIES 
  NAMES apr1 apr-1 apr
  PATHS
  $ENV{APR_DIR}
  NO_DEFAULT_PATH
  PATH_SUFFIXES lib64 lib
)

FIND_LIBRARY(APR_LIBRARIES
  NAMES apr1 apr-1 apr
  PATHS
  ~/Library/Frameworks
  /Library/Frameworks
  /usr/local
  /usr
  /sw
  /opt/local
  /opt/csw
  /opt
  PATH_SUFFIXES lib64 lib
)

INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(APR  DEFAULT_MSG  APR_LIBRARIES APR_INCLUDE_DIR)

MARK_AS_ADVANCED(APR_INCLUDE_DIR APR_LIBRARIES)

